
class DarwController {
 
    constructor() {       
    }
    //监听抽奖结果后调用
    turntableRsq(darw_id:number,darw_level:number ,physical:number,textTime:number,prizeMultiple:number):void{
        view.Farm.luckDarw.createApe(darw_id,darw_level,physical, textTime,prizeMultiple);
    }
    //发送抽奖请求
    sendLuckDarw():void {
        //Game.net.Send("pbdarw.DarwReq", msgSeedReq);
        ComFun.BaseCall("turntable");
    }
    getDarwData():void{
        //从服务器获取体力，抽奖次数
        ComFun.BaseCall("getPhysicalValue");
    }
    physicalValueRsq(physical:number,textTime:number):void{
        darwModel.setPhysicalStrength(physical,textTime);
        Game.viewFarm.LuckDarwRsq(physical,textTime);
    }
    setPhysicalValueRsq(physical:number){
        //设置体力值
        if (view.Farm.luckDarw){
            view.Farm.luckDarw.addPhysicalValueRsq(physical);
        }
    }
    setBubble(){
        if(darwModel.getDarwNum()["physical"] > 0){
             Game.viewFarm.dialbtn.getChildByName("bubble")["visible"] = true;
        }else{
            Game.viewFarm.dialbtn.getChildByName("bubble")["visible"] = false;
        }
    }
}